﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/view.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="Workflow.Common.Tools" %>
<%@ Import Namespace="Workflow.Resource" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

     <script>

         $(function () {
             $('#tt').treegrid('options').queryParams.ReceiveDate = $('#ReceiveDate').datebox('getValue');
             //  $('#tt').treegrid('options').queryParams.ReceiveDate = '1';
             $('#tt').treegrid({
                 title: '<%=Global.PAMonitor %>',
                 
                 width:1080,
                 height: 600,
                 nowrap: false,
                 rownumbers: true,
                 animate: true,
                 collapsible: true,
                 url: '/GPEEM/GetPAMonitor',
                 idField: 'id',
                 treeField: 'region',
                 frozenColumns: [[
	                { title: ' ', field: 'region', width: 140
	                }
				]],
                 columns: [[{ title: '旅費', colspan: 4 },
                { title: '旅費以外', colspan: 8 },
                { title: 'Total', colspan: 1}], [


					{ field: 'f7', title: '国内出張', width: 60 },
                    { field: 'f8', title: '近隣交通費', width: 80 },
					{ field: 'f9', title: '海外出張', width: 60 },
					{ field: 'total5', title: 'Total', width: 70 },
                    { field: 'f10', title: '会議費/交際費', width: 100 },
                    { field: 'f11', title: '寄付', width: 40 },
					{ field: 'f12', title: '開発研究関連', width: 80 },
                    { field: 'f13', title: '謝礼', width: 60 },
                    { field: 'f14', title: 'セミナー', width: 60 },
					{ field: 'f15', title: 'リベート', width: 60 },
                    { field: 'f16', title: 'その他（一般）', width: 100 },
					{ field: 'total6', title: 'Total', width: 40 },
                    { field: 'totlePage', title: 'Total', width: 50, align: 'center' }
				]]

             });
             $('#ReceiveDate').datebox({
                 formatter: function (date) { return date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate(); },
                 parser: function (date) { return new Date(Date.parse(date.replace(/-/g, "/"))); }
             });
         });

         function seach() {
             $('#tt').treegrid('options').queryParams.ReceiveDate = $('#ReceiveDate').datebox('getValue');

             $("#tt").treegrid();
         }

    </script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 
         <h2></h2>
    <table id="tt" class="easyui-treegrid" style="width: 900;
        height: 250px" rownumbers="true" showfooter="false"
        idfield="id" treefield="region" animate="true"  toolbar="#td" >
   
    </table>
    <div id="td">
  <div style="margin-bottom: 5px">
               <%=Global.ReceiveDate %>: <input id="ReceiveDate"    class="easyui-datebox" style="width: 100px" value="<%=ToolsHelper.GetTimeZoneNow().ToString("yyyy/MM/dd") %>">

              <a href="#" class="easyui-linkbutton" iconcls="icon-search" onclick="seach();"><%=Global.Search %></a>

                
       </div>
    </div>
</asp:Content>
